package com.zide.auth.utils;

import com.zide.auth.utils.satoken.StpMemberUtil;
import com.zide.auth.utils.satoken.StpPlatformUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * 上下文类，获取用户信息
 * @author 石添
 * @date 2024/8/24
 */
@Slf4j
public class ZiDeContext {

    /**
     * 获取平台用户信息
     */
    public static Long getPlatformUserId() {
        long userId = StpPlatformUtil.getLoginIdAsLong();
        return userId;

    }


    /**
     * 获取会员用户id
     * @return
     */
    public static Long getMemberUserId() {
        long userId = StpMemberUtil.getLoginIdAsLong();
        return userId;
    }
}
